Page({
  data: {
    headerLayout: {
      title: "我的收藏",
      paddingBottom: 7,
      back: true,
    },
    cardVariantListSelectedIndex: 0,
    cardVariantList: ["活动", "公告"],
    activityCardListLayout: Array.from({length: 10}, () => ({
      image: `https://source.unsplash.com/90x120/?coding&id=${Math.floor(Math.random() * (1000 - 100 + 1) + 100)}`,
      title: "天津市大学生知识产权创新创业大发明与设计大赛",
      tags: ["科创"],
      datetime: {
        date: "2023.08.24",
        day: "周五",
        time: "12：00"
      },
      avatar: `https://source.unsplash.com/12x12/?coding&id=${Math.floor(Math.random() * (1000 - 100 + 1) + 100)}`,
      organizer: "机械科协",
      variant: "activity",
      status: {
        name: "已报名",
        color: "#3DC232"
      }
    })),
    containerPaddingBottom: 0,
  },
  onLoad() {
    let info = wx.getSystemInfoSync()
    this.setData({
      containerPaddingBottom: info.windowHeight - info.safeArea.bottom
    })
  },
  onCardVariantTap(e) {
    this.setData({
      cardVariantListSelectedIndex: e.currentTarget.dataset.index
    })
  }
})
